module Videre
  class Client 
    include Videre::Configurator
    include Videre::Daemon
    include Videre::JabberClient
    include Videre::Command
    attr_accessor :log, :xmpp, :progname, :contacts
    def initialize(progname="videre")
      @progname=progname
      self.contacts=Videre::Contacts.new
    end
  
    # Here is the main execution loop
    def work
      self.open_logger
      self.set_signal_handlers
      self.xmpp_connect
      loop do
        sleep 1
        if respond_to? :run_queue
          run_queue
        end
      end
    end
  end
end
